package com.zhang.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AccountController {

    @Value("${sms.enable}")
    private Boolean smsEnable;

    @GetMapping("/sms")
    public String getSmsConfig() {
        return "smsEnable: " + smsEnable;
    }

    @Value("${applloconfig.druid}")
    private String druidConfig;

    @GetMapping("/druidConfig")
    public String getDruidConfig() {
        return "druidConfig: " + druidConfig;
    }

    @Value("${commonconfig}")
    private String commonConfig;

    //http://localhost:8180/account-service/commonConfig
    @GetMapping("/commonConfig")
    public String getCommonConfig() {
        return "commonConfig: " + commonConfig;
    }

}